<?php
class Encuesta extends AppModel {
	var $name = 'Encuesta';
	var $useTable = 'encuestas';
	var $validate = array(
		'id' => array(
			'numeric' => array(
				'rule' => array('numeric')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'persona_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'curso_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'grupo_id' => array(
			'numeric' => array(
				'rule' => array('numeric')
			),
		),
		'personal' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '20')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'instalaciones' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '20')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'computadoras' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '10')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'expectativas' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '20')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'dominio' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '20')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'dudas' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '20')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'puntualidad' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '20')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'pensum' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '20')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'general' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '20')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		)
	);

	var $belongsTo = array(
		'Persona' => array(
			'className' => 'Persona',
			'foreignKey' => 'persona_id'
		),
		'Curso' => array(
			'className' => 'Curso',
			'foreignKey' => 'curso_id'
		),
		'Grupo' => array(
			'className' => 'Grupo',
			'foreignKey' => 'grupo_id'
		)
	);
}
?>